-
-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: deletes content temporary file on close. #924
Conversation
Bumping this one, would be nice if could be fixed. Right now i have to delete body* and crzmp* and body* manually in our env. |
I will work on this tomorrow |
d18d3a5
to
d4de963
Compare
d4de963
to
1455f1d
Compare
This is green. I will be merging it soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The initial Issue this PR meant to fix was about crzmp*
files, generated by the multipart body processor. Just wanted to raise that we might have to double-check body*
files:
coraza/internal/corazawaf/body_buffer.go
Line 78 in 5fd8d62
br.writer, err = os.CreateTemp(br.options.TmpPath, "body*") |
I think that they are not added to filesTmpNames being really just a way to buffer the body on disk, and not files meant for @inspectFile
. Therefore, we might still have to delete these files
That being said, looks good to me!
Good point, yeah we delete them already on reset (when transaction is being closed): coraza/internal/corazawaf/body_buffer.go Line 168 in 1455f1d
|
Fixes #922.
cc @UnveilTech